<!--
    Desenvolvido pela Fábrica de Software do CESUPA.
    Todos os direitos reservados.

    @author Breno Leite
-->

<ui:component xmlns="http://www.w3.org/1999/xhtml"
              xmlns:ui="http://java.sun.com/jsf/facelets"
              xmlns:h="http://java.sun.com/jsf/html"
              xmlns:f="http://java.sun.com/jsf/core"
              xmlns:a4j="http://richfaces.org/a4j"
              xmlns:rich="http://richfaces.org/rich"
              xmlns:c="http://java.sun.com/jstl/core"
              xmlns:appcommons="http://www.fabsoft.cesupa.br/appcommons">

    <!-- main content top part -->
    <div id="page-header">
        <table border="0" style="width:100%" cellspacing="1">
            <tr>
                <td style="width:2%;text-align:center;vertical-align:middle;">
                    <img src="${pageicon}" width="16" height="16"/>
                </td>
                <td id="page-header-title" style="width:68%;">
                    <h2>${pagetitle}</h2>
                </td>
                <td id="page-controls" style="vertical-align:top;width:auto;">
                    <h:form>
                        <c:if test="#{showpageinfocontrol == null || showpageinfocontrol == true}">
                            <div id="page-info-control" class="page-title-control">
                                <h:outputLink style="padding-right:1px;vertical-align:middle;"
                                              value="#" title="#{tooltipmessages.PageInformations}"
                                              id="page-informations-link">
                                    <h:graphicImage border="0" url="/images/icons/info-16x16.gif"
                                                    alt="#{altmessages.PageInfo}"/>
                                    <rich:componentControl for="page-info-window"
                                                           attachTo="page-informations-link"
                                                           operation="show" event="onclick"/>
                                </h:outputLink>
                            </div>
                        </c:if>
                        <c:if test="#{showpagehelpcontrol == null || showpagehelpcontrol == true}">
                            <div id="page-help-control" class="page-title-control">
                                <h:outputLink style="padding-right:1px;vertical-align:middle;"
                                              value="#" title="#{tooltipmessages.PageHelp}"
                                              id="page-help-link">
                                    <h:graphicImage border="0" url="/images/icons/help-14x14.gif"
                                                    alt="#{altmessages.PageHelp}"/>
                                    <rich:componentControl for="related-help-topics-window"
                                                           attachTo="page-help-link"
                                                           operation="show" event="onclick"/>
                                </h:outputLink>
                            </div>
                        </c:if>
                        <ui:define name="additional-page-controls">
                        </ui:define>
                    </h:form>
                </td>
            </tr>
        </table>
    </div>

    <c:if test="#{showbreadcrumb == null || showbreadcrumb != 'false'}">
        <h:form>
            <div>
                <div id="breadcrumb">
                    <ul>
                        <li class="first">#{words.YoureAt}:</li>
                        <li class="second">
                            <h:commandLink value="#{words.Home}"
                                           action="SYSTEM.goToInitialPage"/>
                        </li>
                        <ul>
                            <ui:insert name="breadcrumb">

                            </ui:insert>
                        </ul>
                        <li>${pagetitle}</li>
                    </ul>
                </div>
            </div>
        </h:form>
    </c:if>

    <div style="border:solid 3px #97B7E1;">
        <c:if test="#{showpagecontrols == 'true'}">
            <div id="page-control-area">
                <ui:insert name="controls">
                    #{messages.NoControls}
                </ui:insert>
            </div>
        </c:if>

        <div id="content">
            <!-- main content body -->
            <ui:insert name="content">
                #{messages.NoContent}
            </ui:insert>
        </div>
    </div>
</ui:component>